package cn.taoticket.client;

import cn.taoticket.pojo.TaoticketUser;

import cn.taoticket.fallback.TaoticketUserClientFallBack;

import java.util.List;
import java.util.Map;

import cn.taoticket.config.TaoTicketConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "taoticket-user-provider", configuration = TaoTicketConfiguration.class, fallback = TaoticketUserClientFallBack.class)
public interface RestTaoticketUserClient {
    @RequestMapping(value = "/getTaoticketUserById", method = RequestMethod.POST)
    public TaoticketUser getTaoticketUserById(@RequestParam("id") Long id) throws Exception;

    @RequestMapping(value = "/getTaoticketUserListByMap", method = RequestMethod.POST)
    public List<TaoticketUser> getTaoticketUserListByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getTaoticketUserCountByMap", method = RequestMethod.POST)
    public Integer getTaoticketUserCountByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/qdtxAddTaoticketUser", method = RequestMethod.POST)
    public Integer qdtxAddTaoticketUser(@RequestBody TaoticketUser taoticketUser) throws Exception;

    @RequestMapping(value = "/qdtxModifyTaoticketUser", method = RequestMethod.POST)
    public Integer qdtxModifyTaoticketUser(@RequestBody TaoticketUser taoticketUser) throws Exception;

    @RequestMapping(value = "/checkLoginByPassword", method = RequestMethod.POST)
    public TaoticketUser checkLoginByPassword(@RequestBody TaoticketUser dmUser) throws Exception;

    @RequestMapping(value = "/generateToken", method = RequestMethod.POST)
    public String generateToken(@RequestBody TaoticketUser dmUser) throws Exception;
}

